package com.eunion.core.common.jpa;

import java.io.Serializable;

import javax.persistence.EntityManager;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean;
import org.springframework.data.repository.core.support.RepositoryFactorySupport;

import com.eunion.core.common.jpa.deletgate.ProjectionSupportedJpaRepositoryFactorySupport;

public class ProjectionSupportedJpaRepositoryFactoryBean<R extends JpaRepository<T, I>, T, I extends Serializable>
    extends JpaRepositoryFactoryBean<R, T, I> {

    public ProjectionSupportedJpaRepositoryFactoryBean(Class<? extends R> repositoryInterface) {
        // super(repositoryInterface);
        super();
    }

    @Override
    protected RepositoryFactorySupport createRepositoryFactory(EntityManager em) {
        return new ProjectionSupportedJpaRepositoryFactorySupport(em);
    }

}